import request from '@/utils/request'


// 会议室开始---------------------------
export function getRooms(params) {
  return request({
    url: '/rooms/room/',
    method: 'GET',
    params
  })
}

export function getAllRoom() {
  return request({
    url: '/rooms/room_list/',
    method: 'GET',
  })
}

export function addRoom(data) {
  return request({
    url: '/rooms/room/',
    method: 'POST',
    data
  })
}


export function updateRoom(data) {
  return request({
    url: `/rooms/room/${data.id}/`,
    method: 'PUT',
    data
  })
}

export function deleteRoom(room_id) {
  return request({
    url: `/rooms/room/${room_id}/`,
    method: 'DELETE',
  })
}

export function delRooms(data) {
  return request({
    url: '/rooms/room/batch_delete/',
    method: 'DELETE',
    data
  })
}


// 会议室结束----------------------------


// 视频登录用户开始---------------------------
export function getVideoLoginUsers(params) {
  return request({
    url: '/rooms/video_login_user/',
    method: 'GET',
    params
  })
}
export function addVideoLoginUser(data) {
  return request({
    url: '/rooms/video_login_user/',
    method: 'POST',
    data
  })
}


export function updateVideoLoginUser(data) {
  return request({
    url: `/rooms/video_login_user/${data.id}/`,
    method: 'PUT',
    data
  })
}

export function deleteVideoLoginUser(user_id) {
  return request({
    url: `/rooms/video_login_user/${user_id}/`,
    method: 'DELETE',
  })
}

export function delVideoLoginUsers(data) {
  return request({
    url: '/rooms/video_login_user/batch_delete/',
    method: 'DELETE',
    data
  })
}


// 视频登录用户结束----------------------------



// 视频用户开始---------------------------
export function getVideoUsers(params) {
  return request({
    url: '/rooms/video_user/',
    method: 'GET',
    params
  })
}
export function addVideoUser(data) {
  return request({
    url: '/rooms/video_user/',
    method: 'POST',
    data
  })
}


export function updateVideoUser(data) {
  return request({
    url: `/rooms/video_user/${data.id}/`,
    method: 'PUT',
    data
  })
}

export function deleteVideoUser(user_id) {
  return request({
    url: `/rooms/video_user/${user_id}/`,
    method: 'DELETE',
  })
}

export function delVideoUsers(data) {
  return request({
    url: '/rooms/video_user/batch_delete/',
    method: 'DELETE',
    data
  })
}


// 视频用户结束----------------------------

